<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="resources/templates/mainTemplate.xhtml">
    
    <ui:param name="pagetitle" value="CHUMS - Add Instructor"/>
    
    <ui:define name="centerContent" class="turquaz">   
    
        <p:ajaxStatus onstart="statusDialog.show();" onsuccess="statusDialog.hide();"/>  

        <p:dialog appendToBody="true" resizable="false" modal="true" widgetVar="statusDialog" header="Loading"   
                  draggable="false" closable="false">  
            <p:graphicImage value="resources/images/ajax-loader.gif" />
        </p:dialog> 
        
        <p:fieldset legend="Add Instructor">  
            <h:form id="form">  
                <p:message for="form" />
                <table>
                    <tr>
                        <td>
                            Title:
                        </td>
                        <td>
                            <p:inputText id="title" value="#{adminBean.toAddWebResource.title}"/>

                        </td>
                        <td>

                            <p:message for="title" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            URL:
                        </td>
                        <td>
                            <p:inputText id="url" value="#{adminBean.toAddWebResource.url}"/>

                        </td>
                        <td>

                            <p:message for="url" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Description
                        </td>
                        <td>
                            <p:inputTextarea rows="3" cols="20" id="description" value="#{adminBean.toAddWebResource.description}"/>

                        </td>
                        <td>

                            <p:message for="description" />
                        </td>
                    </tr>
                    
                    <tr>
                        <td>

                        </td>
                        <td>
                            <p:commandButton id="submit" value="Submit" update="form" action="#{adminBean.addInstructor()}"/>
                        </td>
                        <td>

                        </td>
                    </tr>
                    
                </table>
                <p:defaultCommand target="submit" />
            </h:form>
        </p:fieldset>
        
    </ui:define>
    <ui:define name="leftContent" class="turquaz">
        <ui:include src="managementLeftPanel.xhtml" />
    </ui:define> 
    
</ui:composition>

